package algorithm.sphericharmonics;

/*
 * In this documentation (and the ccSHT code) standard mathematical spherical 
 * coordinates (theta, phi) are used. We will briefly define these coordinates. 
 * Let us refer to an arbitrary fixed direction as the ``north pole''. 
 * theta is the latitudinal angle measured in radians with the value zero 
 * at the north pole and increasing to pi at the south pole. phi is the 
 * longitudinal angle measured in radians and increasing counter clockwise 
 * (to the east) around the north pole ranging from zero to two pi.
 */
/*
 * The information about the pixelization is stored in a structure called a 
 * coordStructure
 */
public class CoordStructure {
	  public float pixSize; 
	  public int nPix;  		// Number of specified pixels on the sphere.
	  public int nThetaVals; 	// Number of latitudinal (constant theta) rows of pixels which are specified.
	  public float[] thetaVals; // A vector of theta values in radians for each row of pixels. This list should 
	  							// be ordered in a way consistent with the pixel indexing scheme.
	  public int[] thetaBreaks; // A vector of pixel numbers for the start of each row of constant theta.
	  public float[] phi0;		// A vector of phi values for the first pixel in each latitudinal (constant theta) row.
	  
	  public float[] deltaPhi;    // A vector of pixel widths in radians for each row of constant theta. 
	  							// This is the change in phi between two contiguous pixels with the same theta value. 
	  							// The sign of each deltaPhi specifies if the phi values increase or decrease (+/-) 
	  							// in the pixel ordering for the corresponding row. 
	  							// Note that deltaPhi is not the angular distance between 
	  							//contiguous pixels which is deltaPhi*sin(theta).
	  public int nGaps;			/*
	  							Number of gaps in otherwise regularly spaced in phi rows of 
	  							constant theta. Note that these gaps must have a width 
	  							which is an integer number of pixels, and if there is 
	  							an unspecified region before the first pixel in a row 
	  							and after the last pixel in the row, this is not considered a gap.
	   							*/
	  public int[] gaps; /*
	      a gap refers to missing pixels in a row after the first pixel 
	      and before the last pixel; 
	      A column major ordered 2 by nGaps matrix of pixel numbers 
	      where gaps begin in the first row and width of gap in second row. 
	      So if gaps were the following matrix
     		[ 2 5 9 ]
     		[ 3 1 2 ]
    	and the input pixel vector was
     	[ 0.1 1 2 3 4 5 6 7 8 9 10 11 ]
    	then the zero padded vector (i.e. the vector with filled in gaps) would be
     	[ 0.1 1 0 0 0 2 3 4 0 5 6 7 8 0 0 9 10 11 ]    
	  */
	public static CoordStructure makeTest(){
		CoordStructure struct=new CoordStructure();
		struct.pixSize=1;
		struct.nPix=0; 
		struct.nThetaVals=2; 
		
		return struct; 
	}
}
